package com.thirdgroup.dao.impl;

import com.thirdgroup.dao.IndustryDao;
import com.thirdgroup.dao.base.BaseDAO;
import com.thirdgroup.pojo.entity.BusinessCustomerIndustry;
import com.thirdgroup.pojo.entity.CustomerInfo;

import java.util.List;

public class IndustryDaoImpl extends BaseDAO<BusinessCustomerIndustry> implements IndustryDao {
    @Override
    public Integer selectByName(String name) {
        String sql="select industryID from business_customer_industry where industryName=?";
        Object[] params={name};
        return (Integer) super.getValue(sql,params);
    }

    @Override
    public List<BusinessCustomerIndustry> selectName() {
        String sql="select * from business_customer_industry";
        return super.findAll(sql,null);
    }

    @Override
    public String selectById(Integer id) {
        String sql="select industryName  from business_customer_industry where industryID=?";
        Object[] params={id};
        return (String) super.getValue(sql,params);
    }
}
